package at.fhooe.mc.pro.treeproject;
import static org.junit.Assert.*;

import org.junit.Test;


public class TreeNodeTest {
	TreeNode tree;
	
	@Test
	public void testSearchNode() {

		tree = new TreeNode (17);
		TreeNode head = tree; //um start zu speichern
		
		tree.left = new TreeNode(5);
		tree.right = new TreeNode(42);
		
		tree = tree.left;
		tree.left = new TreeNode(3);
		tree.right = new TreeNode(9);
		
		tree = head;
		tree = tree.right;
		
		tree.left = new TreeNode(24);
		tree.right = new TreeNode(55);
		
		tree = head;
		
		assertTrue(tree.searchNode(tree,9));
	}

}
